<?php
namespace app\api\model;
use app\model\Base;

class ProductSku extends Base
{
    public function getCoverAttr($value, $data)
    {
        return $this::getOldUrl() . $data['image'];
    }

    public function products()
    {
        return $this->hasOne(Product::class, 'id', 'good_id')->bind(['name']);
    }
}